<template>
    <div>这是商品页面
        <span>{{$route.params.goodId}}</span>
        <span>{{$route.params.userName}}</span>

        <router-link to="/good/image">商品图片</router-link>
        <router-link to="/good/title">商品标题</router-link>

        <div>
            <router-view></router-view>
        </div>
        <router-link to="/cart">购物车</router-link>

        <button @click="jump">button 跳转</button>

    </div>
</template>

<script>
    export default {
        name: "good-lists",
        methods:{
            jump(){
                this.$router.push('/cart?goodId=939');
            }
        }
    }
</script>

<style scoped>

</style>